using System;
using System.Collections.Generic;
using System.Text;

namespace CS6238Project2.Banking.Commerce
{
    /// <summary>
    /// An item that has a descriptive and quantitative quality
    /// </summary>
    [Serializable]
    
    public class Good
    {
        private string name;
        private int worth;

        /// <summary>
        /// Default constructor creates a null-filled structure
        /// </summary>
        public Good()
        {
            name = "";
            worth = 0;
        }

        /// <summary>
        /// Simple constructor instantiates Good qualities
        /// </summary>
        /// <param name="n">Name</param>
        /// <param name="val">Worth/Value</param>
        public Good(string n, int val)
        {
            name = n;
            worth = val;
        }

        /// <summary>
        /// The name of the good
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        /// <summary>
        /// The value of the good
        /// </summary>
        public int Worth
        {
            get { return worth; }
            set { worth = value; }
        }

        new public String ToString()
        {
            return name;
        }

    }
}
